<script setup>
import { ref } from 'vue'
import dayjs from 'dayjs'
const time = ref(new Date())
const forMat = (t) => {
  // var y = t.getFullYear()
  // var m = t.getMonth() + 1
  // return `${y}-${m}`
  return dayjs(t).format('YYYY-MM-DD hh:mm:ss')
}
</script>
<template>
  <div>
    御剑乘风来,除魔天地间!===vue3==={{ forMat(time) }}
  </div>
</template>
<style lang='less'  scoped>
</style>